<template>
 <div class="yingmoo-media">
   <ym-header></ym-header>
   <ym-medianav></ym-medianav>
   <ym-secondnav></ym-secondnav>
   
<!--  广告轮播  -->
    <div class="ym-lunbo">
      <el-carousel indicator-position="inside">
        <el-carousel-item v-for="(v,i) in banners" :key="i">
          <img :src="v.imgpath" />
        </el-carousel-item>
      </el-carousel>
    </div>
<!--  灯箱广告  -->
    <div class="yingmoo-template-model">
      <div class="column-navbar grey">
        <h1 class="column-title">
          <img class="column-icon" src="../assets/ym-index/icon-yun1.png" />
          <span class="column-name">灯箱广告</span>
          <img class="column-arrow" src="../assets/ym-index/bg-arrow.png" />
        </h1>
        <p class="column-citys">
          <span>北京</span>
          <span>上海</span>
          <span>广州</span>
          <span>深圳</span>
          <span>武汉</span>
          <span>更多</span>
        </p>
      </div>
      <div class="column-content">
        <dl class="media-annimation">
          <dt v-for="(v,i) in list1" :key="i">
            <img width="466px" height="290px" :src="v.imgpath" />
          </dt> 
          <!--<dt>
            <img src="../assets/ym-media/annimation.png" />
          </dt>-->
        </dl>
        <div class="media-big-model">
          <dl class="media-model" v-for="n in list2">
            <dt>
              <img width="222px" height="198px" :src="n.imgpath" />
            </dt>
            <dd class="media-text-first" :title='n.name'>{{n.name}}</dd>
            <dd class="media-text-secend">￥{{n.price}}</dd>
            <dd class="media-text-city">{{n.remark}}</dd>
          </dl>
        </div>
      </div>
    </div>
<!--  LED显示屏广告  -->
    <div class="yingmoo-template-model">
      <div class="column-navbar grey">
        <h1 class="column-title">
          <img class="column-icon" src="../assets/ym-index/icon-yun1.png" />
          <span class="column-name">LED显示屏广告</span>
          <img class="column-arrow" src="../assets/ym-index/bg-arrow.png" />
        </h1>
        <p class="column-citys">
          <span>北京</span>
          <span>上海</span>
          <span>广州</span>
          <span>深圳</span>
          <span>武汉</span>
          <span>更多</span>
        </p>
      </div>
      <div class="column-content">
        <dl class="media-annimation">
          <dt v-for="(v,i) in list3" :key="i">
            <img width="466px" height="290px" :src="v.imgpath" />
          </dt> 
        </dl>
        <div class="media-big-model">
          <dl class="media-model" v-for="n in list4">
            <dt>
              <img width="222px" height="198px" :src="n.imgpath" />
            </dt>
            <dd class="media-text-first" :title='n.name'>{{n.name}}</dd>
            <dd class="media-text-secend">￥{{n.price}}</dd>
            <dd class="media-text-city">{{n.remark}}</dd>
          </dl>
        </div>
      </div>
    </div>
<!--  picture广告位  -->
    <div class="yingmoo-picture">
        <img v-for="v in list5" :src="v.imgpath" />
    </div>
<!--  火车内广告  -->
    <div class="yingmoo-animation">
      <div class="column-navbar grey">
        <h1 class="column-title">
          <img class="column-icon" src="../assets/ym-index/icon-yun1.png" />
          <span class="column-name">火车内广告</span>
          <img class="column-arrow" src="../assets/ym-index/bg-arrow.png" />
        </h1>
        <p class="column-citys">
          <span>看板</span>
          <span>桌板</span>
          <span>电视</span>
          <span>枕巾</span>
          <span>床贴</span>
        </p>
      </div>
      <div class="column-animation">
        <img v-for="v in list6" width="222px" :src="v.imgpath" class="images" />
        <div class="column-contents">
          <div class="column-content contentTwo">
            <dl class="media-model" v-for="n in list7">
              <dt>
                <img width="222px" height="198" :src="n.imgpath" />
              </dt>
              <dd class="media-text-first" :title='n.name'>{{n.name}}</dd>
              <dd class="media-text-secend">￥{{n.price}}</dd>
              <dd class="media-text-city">{{n.remark}}</span></dd>
            </dl>
          </div>
        </div>
      </div>
    </div>
<!--  推荐火车媒体  -->
    <div class="yingmoo-template">
      <div class="column-navbar grey">
        <h1 class="column-title">
          <img class="column-icon" src="../assets/ym-index/icon-yun1.png" />
          <span class="column-name">推荐火车媒体</span>
          <img class="column-arrow" src="../assets/ym-index/bg-arrow.png" />
        </h1>
      </div>
      <div class="column-content">
        <dl class="media-model" v-for="n in list8">
          <dt>
            <img width="222px" height="198px" :src="n.imgpath" />
          </dt>
          <dd class="media-text-first" :title='name'>{{n.name}}</dd>
          <dd class="media-text-secend">￥{{n.price}}</dd>
          <dd class="media-text-city">{{n.remark}}</span></dd>
        </dl>
      </div>
    </div>
    <ym-footer></ym-footer>
 </div>
</template>
<script>
  import ymHeader from "@/components/ymHeader.vue";
  import ymMedianav from "@/components/ymMedianav.vue";
  import ymFooter from "@/components/ymFooter.vue";
  import ymSecondnav from "@/components/ymSecondnav.vue";
  export default {
    name: "yingmoo-media",
    components: {
      ymHeader,
      ymMedianav,
      ymSecondnav,
      ymFooter
    },
    data() {
      return {
      	requestAddr:this.GLOBAL.addr,
        /* banner数据，方便修改 */
        banners: [{
          imgUrl: require('@/assets/ym-media/media-lunbo-train.png')
        }, {
          imgUrl: require('@/assets/ym-media/media-lunbo-train.png')
        }, {
          imgUrl: require('@/assets/ym-media/media-lunbo-train.png')
        }],
        model: [{
          modeltext: '媒体名称媒体名称媒体名称',
          modelmoney: '价格：120万 元/年',
          modelcity: '北京西站',
          modellook: '看板'
        }, {
          modeltext: '媒体名称媒体名称媒体名称',
          modelmoney: '价格：120万 元/年',
          modelcity: '北京西站',
          modellook: '看板'
        }, {
          modeltext: '媒体名称媒体名称媒体名称',
          modelmoney: '价格：120万 元/年',
          modelcity: '北京西站',
          modellook: '看板'
        }, {
          modeltext: '媒体名称媒体名称媒体名称',
          modelmoney: '价格：120万 元/年',
          modelcity: '北京西站',
          modellook: '看板'
        }, {
          modeltext: '媒体名称媒体名称媒体名称',
          modelmoney: '价格：120万 元/年',
          modelcity: '北京西站',
          modellook: '看板'
        }],
        template: [{
          templatetext: '媒体名称媒体名称媒体名称',
          templatemoney: '￥120万 年',
          templatecity: '北京西站',
          templatelook: '看板'
        }, {
          templatetext: '媒体名称媒体名称媒体名称',
          templatemoney: '价格：120万 元/年',
          templatecity: '北京西站',
          templatelook: '看板'
        }, {
          templatetext: '媒体名称媒体名称媒体名称',
          templatemoney: '价格：120万 元/年',
          templatecity: '北京西站',
          templatelook: '看板'
        }, {
          templatetext: '媒体名称媒体名称媒体名称',
          templatemoney: '价格：120万 元/年',
          templatecity: '北京西站',
          templatelook: '看板'
        }, {
          templatetext: '媒体名称媒体名称媒体名称',
          templatemoney: '价格：120万 元/年',
          templatecity: '北京西站',
          templatelook: '看板'
        }, {
          templatetext: '媒体名称媒体名称媒体名称',
          templatemoney: '价格：120万 元/年',
          templatecity: '北京西站',
          templatelook: '看板'
        }],
        animation: [{
          animationtext: '媒体名称媒体名称媒体名称',
          animationmoney: '价格：120万 元/年',
          animationcity: '北京西站',
          animationlook: '看板'
        }, {
          animationtext: '媒体名称媒体名称媒体名称',
          animationmoney: '价格：120万 元/年',
          animationcity: '北京西站',
          animationlook: '看板'
        }, {
          animationtext: '媒体名称媒体名称媒体名称',
          animationmoney: '价格：120万 元/年',
          animationcity: '北京西站',
          animationlook: '看板'
        }, {
          animationtext: '媒体名称媒体名称媒体名称',
          animationmoney: '价格：120万 元/年',
          animationcity: '北京西站',
          animationlook: '看板'
        }, {
          animationtext: '媒体名称媒体名称媒体名称',
          animationmoney: '价格：120万 元/年',
          animationcity: '北京西站',
          animationlook: '看板'
        }, {
          animationtext: '媒体名称媒体名称媒体名称',
          animationmoney: '价格：120万 元/年',
          animationcity: '北京西站',
          animationlook: '看板'
        }, {
          animationtext: '媒体名称媒体名称媒体名称',
          animationmoney: '价格：120万 元/年',
          animationcity: '北京西站',
          animationlook: '看板'
        }, {
          animationtext: '媒体名称媒体名称媒体名称',
          animationmoney: '价格：120万 元/年',
          animationcity: '北京西站',
          animationlook: '看板'
        }],
		list1:[],
        list2:[],
        list3:[],
        list4:[],
        list5:[],
        list6:[],
        list7:[],
        list8:[]
      }
    },
    mounted(){
		this.getList(60,3);//轮播
		this.getList(61,2);//灯箱推荐
		this.getList(63,8);//灯箱图片组
		this.getList(65,2);//LED推荐
		this.getList(67,8);//LED图片组
		this.getList(69,1);//图片广告
		this.getList(90,1);//火车内广告推荐
		this.getList(91,8);//火车内广告图片组
		this.getList(92,10);//推荐火车媒体
	},
	methods:{
		getList:function(adid ,limit){
	  		this.$http({
					url: this.requestAddr+'/GetJson/get/adshow?adid='+adid+"&limit="+limit,
					method: 'JSONP',
				    headers: {'Content-Type': 'application/x-www-form-urlencoded'},
					jsonp: 'callbackparam'
				}).then(res => {
					console.log(res.data);
					if(res.data != null){
						if(adid == 60){this.banners = res.data;}
						if(adid == 61){this.list1 = res.data;}
						if(adid == 63){this.list2 = res.data;}
						if(adid == 65){this.list3 = res.data;}
						if(adid == 67){this.list4 = res.data;}
						if(adid == 69){this.list5 = res.data;}
						if(adid == 90){this.list6 = res.data;}
						if(adid == 91){this.list7 = res.data;}
						if(adid == 92){this.list8 = res.data;}
					}
				}).catch()
		}
	}
  }

</script>

<style scoped lang="less">
  .yingmoo-media {
    width: 100%;
    background-color: #f3f9ff;
    .ym-lunbo {
      width: 100%;
      height: 450px;
      position: absolute;
      top: 234px;
      left: 0;
      z-index: 1;
    }
    .yingmoo-template-model {
      width: 1200px;
      margin: 0 auto;
      margin-top: 30px;
      .column-navbar {
        height: 44px;
        line-height: 44px;
        position: relative;
        &.grey {
          background-color: #e6e6e6;
        }
        .column-title {
          position: absolute;
          left: 0;
          top: 0;
          z-index: 1;
          width: 247px;
          color: #fbb03b;
          font-size: 18px;
          background-color: #036eb7;
          .column-icon {
            margin-left: 26px;
          }
          .column-arrow {
            position: absolute;
            right: -26px;
            top: 0;
          }
        }
        .column-citys {
          line-height: 44px;
          width: 435px;
          background: none;
          color: #999999;
          margin-right: 30px;
          float: right;
          span {
            padding-left: 20px;
            padding-right: 20px;
            font-size: 14px;
          }
        }
      }
      .column-content {
        width: 1200px;
        background-color: transparent;
        display: flex;
        justify-content: space-between;
        .media-annimation {
          dt {
            margin-top: 20px;
            margin-right: 20px;
          }
        }
        .media-big-model {
          width: 715px;
          .media-model {
            width: 224px;
            height: 291px;
            margin-top: 20px;
            float: left;
            margin-left: 14px;
            dd {
              background-color: white;
              height: 24px;
              line-height: 24px;
              padding-left: 10px;
            }
            .media-text-first {
              height: 24px;
              font-size: 14px;
              padding-top: 9px;
              overflow: hidden;
              text-overflow : clip;
            }
            .media-text-secend {
              font-size: 12px;
              color: red;
            }
            .media-text-city {
              font-size: 12px;
              color: #999999;
              padding-bottom: 6px;
              span {
                padding-left: 15px;
              }
            }
          }
        }
      }
    }

    .yingmoo-picture {
      width: 1200px;
      margin: 0 auto;
      margin-top: 30px;
      img {
        width: 100%;
      }
    }

    .yingmoo-animation {
      width: 1200px;
      margin: 0 auto;
      margin-top: 30px;
      .column-navbar {
        height: 44px;
        line-height: 44px;
        position: relative;
        &.grey {
          background-color: #e6e6e6;
        }
        .column-title {
          position: absolute;
          left: 0;
          top: 0;
          z-index: 1;
          width: 247px;
          color: #fbb03b;
          font-size: 18px;
          background-color: #036eb7;
          .column-icon {
            margin-left: 26px;
          }
          .column-arrow {
            position: absolute;
            right: -26px;
            top: 0;
          }
        }
        .column-citys {
          line-height: 44px;
          width: 380px;
          background: none;
          color: #999999;
          float: right;
          span {
            padding-left: 20px;
            padding-right: 20px;
            font-size: 14px;
          }
        }
      }
      .column-animation {
        width: 1200px;
        margin: 0 auto;
        display: flex;
        justify-content: space-between;
        .images {
          height: 600px;
          margin-top: 20px;
        }
        .column-contents {
          width: 960px;
          .column-content {
            width: 960px;
            background-color: transparent;
            .media-model {
              width: 224px;
              height: 291px;
              margin-top: 20px;
              float: left;
              margin-left: 16px;
              dd {
                background-color: white;
                height: 24px;
                line-height: 24px;
                padding-left: 10px;
              }
              .media-text-first {
                height: 24px;
                font-size: 14px;
                padding-top: 9px;
                overflow: hidden;
                text-overflow : clip;
              }
              .media-text-secend {
                font-size: 12px;
                color: red;
              }
              .media-text-city {
                font-size: 12px;
                color: #999999;
                padding-bottom: 6px;
                span {
                  padding-left: 15px;
                }
              }
            }
          }
          .contentTwo {
            margin-top: 2px;
          }
        }
      }
    }
    .yingmoo-template {
      width: 1200px;
      height: 665px;
      margin: 0 auto;
      margin-top: 30px;
      .column-navbar {
        height: 44px;
        line-height: 44px;
        position: relative;
        &.grey {
          background-color: #e6e6e6;
        }
        .column-title {
          position: absolute;
          left: 0;
          top: 0;
          z-index: 1;
          width: 247px;
          color: #fbb03b;
          font-size: 18px;
          background-color: #036eb7;
          .column-icon {
            margin-left: 26px;
          }
          .column-arrow {
            position: absolute;
            right: -26px;
            top: 0;
          }
        }
      }
      .column-content {
        width: 1200px;
        background-color: transparent;
        .media-model {
          width: 224px;
          height: 291px;
          margin-top: 20px;
          float: left;
          margin-left: 20px;
          &:nth-child(1){
            margin-left: 0;
          }
          &:nth-child(6){
            margin-left: 0;
          }
          dd {
            background-color: white;
            height: 24px;
            line-height: 24px;
            padding-left: 10px;
          }
          .media-text-first {
            height: 24px;
            font-size: 14px;
            padding-top: 9px;
            overflow: hidden;
            text-overflow : clip;
          }
          .media-text-secend {
            font-size: 12px;
            color: red;
          }
          .media-text-city {
            font-size: 12px;
            color: #999999;
            padding-bottom: 6px;
            span {
              padding-left: 15px;
            }
          }
        }
      }
    }
  }

</style>
